package com.lfs.market.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lfs.market.model.dto.OrderDto;
import com.lfs.market.model.entity.Orders;
import com.lfs.market.model.vo.AdminOrderDetailVo;
import com.lfs.market.model.vo.PaymentOrderVo;

import java.time.LocalDateTime;
import java.util.List;

public interface OrdersService extends IService<Orders> {
    /**
     * 根据订单号查询订单信息
     *
     * @param orderNo
     * @return
     */
    Orders selectByOrderNo(String orderNo);

    /**
     * 创建订单
     *
     * @param orders
     */
    String createOrder(OrderDto orders);


    /**
     * 根据订单查询价格
     * @param paymentOrderId
     * @return
     */
    PaymentOrderVo selectOrderNo(String paymentOrderId);

    /**
     * 完成支付
     * @param orderNo
     */
    void finishPay(String orderNo);

    /**
     * 根据用户id查询订单信息
     * @param userId
     * @return
     */
    List<Orders> getByUserId(String userId);

    /**
     * 根据订单号查询订单信息
     * @param id
     * @return
     */
    AdminOrderDetailVo getOrderDetail(String id);

    /**
     * 定时清除订单
     * @return
     */
    List<Orders> orderTaskDelete();

//    /**
//     * 查询订单详情
//     * @param productOrderId
//     * @return
//     */
//    OrderDetailVo selectOrderDetail(String productOrderId);
}
